#本节进行ggplot2画简单条形图

#加载包
library(ggplot2)

#组合数据
type<-c("other","company-diqu","company-home","company-intro","company-jyms","company-pm","company-products")
mycount<-c(4,6,135,63,2,4,36)
dt<-data.frame(type,mycount)

#制作条形图
p<-ggplot(dt,aes(x=type,weight=mycount,fill=type))
p + geom_bar()